<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jstl/core" xmlns:ui="http://java.sun.com/jsf/facelets">
	<head>
		<!-- META tags -->
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta http-equiv="Default-Style" content="Serie402 CSS" />
		<ui:insert name="pageMetaTags" />
		
		<!-- Window title -->
		<title>Serie402.COM - <ui:insert name="windowTitle" /></title>
		
		<!-- Stylesheets -->
		<link href="#{request.contextPath}/resources/css/serie402.css" rel="stylesheet" type="text/css" title="Serie402 CSS" />
		<ui:insert name="pageHeadStylesheet" />
		
		<!-- Scripts -->
		<script type="text/javascript" src="#{request.contextPath}/resources/javascript/serie402.js"></script>
		<ui:insert name="pageHeadScript" />
	</head>
	
	<body>
		<!-- for some odd reason we need to enter an extra script in order for page to render on IE -->
		<script type="text/javascript">var test="";</script>
		<ui:insert name="bodyStartScript" />
		
		<!-- main table -->
		<table class="MainTable">
			<!-- header -->
			<tr>
				<td colspan="2" class="TopContent">
					<table class="TopContentTable">
						<tr>
							<!-- logo -->
							<td class="TopLogo" onclick="goToPage('/web');"></td>
							
							<!-- top classifieds -->
							<td class="TopClassifieds"><h:outputText value="#{classifiedsManagedBean.topClassifieds}" escape="false" /></td>
						</tr>
					</table>
				</td>
			</tr>
			
			<!-- main menu -->
			<tr>
				<td class="MainMenu" colspan="2">
					<ui:include src="/_includes/menu/publicMenu.jsp" />
				</td>
			</tr>
			
			<!-- main content -->
			<tr>
				<!-- main content -->
				<td class="MainContent">
					<table class="ContentSectionsTable">
						<tr>
							<td class="PageTitle"><ui:insert name="pageTitle" /></td>
						</tr>
						
						<tr>
							<td class="ContentSection">
								<c:if test="${requestScope.breakingNews == true}">
									<table class="BreakingNewsTable" onclick="goToNews('#{newsManagedBean.breakingNews.newsId}');">
										<tr>
											<td class="BreakingNewsImage" style="background-image:url('#{newsManagedBean.breakingNews.photo.url}');"></td>
											<td class="BreakingNewsContent">
												<span class="NewsTitleHeader BreakingNewsHeader BlockDisplay">Ultima Noticias: <h:outputText value="#{newsManagedBean.breakingNews.title}" /></span>
												<span class="BlockDisplay"><h:outputText value="#{newsManagedBean.breakingNews.description}" /></span>
											</td>
										</tr>
									</table>
								</c:if>
								
								<ui:insert name="mainContent" />
							</td>
						</tr>
					</table>
				</td>
				
				<!-- classifieds -->
				<td class="MainContentClassifieds">
					<table class="ClassifiedEntries">
						<tr>
							<td class="SiteSearch" id="SiteSearchTD">
								<!--
									Wordpress integration:
									form action =  http://serie402.wordpress.com/
									search text field name = s
								-->
								<form action="#{request.contextPath}/_pages/public/search/find.jsf?level=basic" method="post">
									<!--span style="display:block; font-size:7pt; padding-bottom:5px;"><h:outputText value="#{genericManagedBean.currentDate}" escape="false" /></span-->
									<!--span style="display:block; font-size:7pt; padding-bottom:5px;">Buscar en: <ui:insert name="searchContext" /></span-->
									<span style="display:block; font-size:7pt; padding-bottom:5px;"><a href="#{request.contextPath}/_pages/public/search/advancedSearch.jsf">Advanced Search</a></span>
									
									<input name="searchQuery" /><input type="submit" value="Search" class="Button" />
								</form>
							</td>
						</tr>
						
						<!-- managed bean will return classfieds rows -->
						<h:outputText value="#{classifiedsManagedBean.mainClassifieds}" escape="false" />
					</table>
				</td>
			</tr>
			
			<!-- footer -->
			<tr>
				<td class="Footer" colspan="2">
					<a href="#{request.contextPath}/_pages/public/home.jsf">Home</a> :
					<a href="#{request.contextPath}/_pages/public/aboutUs.jsf">About Us</a> : 
					<a href="#{request.contextPath}/_pages/public/contactUs.jsf">Contact Us</a> : 
					<a href="#{request.contextPath}/_pages/public/privacy.jsf">Privacy Policy</a> : 
					<a href="#{request.contextPath}/_pages/public/archive.jsf">Archives</a> :
					<span style="color:gray;">&#169; 2012 Serie402.com</span>
				</td>
			</tr>
			
			<!-- bottom classifieds -->
			<tr>
				<td class="BottomClassifieds" colspan="2"><h:outputText value="#{classifiedsManagedBean.bottomClassifieds}" escape="false" /></td>
			</tr>
		</table>
		
		<ui:insert name="bodyEndScript" />
	</body>
</html>